package imachine;

/**
 * Class for the state in Finite State Machine.
 * 
 * @version 0.0.1
 * @author Xiong Yi: xiongyee2000@gmail.com
 */
public final class State {
	/**
	 * Every state machine has a final state, which
	 * state id is always -1;
	 */
	public static final int FINAL_STATE_ID = -1;
	
	/**
	 * The id of the state.
	 */
	public final int id;

	/**
	 * The sub machine of this state.
	 */
	public final Machine subMachine;

	/**
	 * Constructor
	 * @param id the id of the state
	 */
	public State(int id) {
		this.id = id;
		subMachine = null;
	};

	/**
	 * Constructor`
	 * @param id the id of the state
	 * @param subMachine the sub machine of the state
	 */
	public State(int id, final Machine subMachine) {
		this.id = id;
		this.subMachine = subMachine;
	}
}
